﻿using AutoMapper;
using Sample.Core.Models;

namespace MT.Job.Core.Services
{
    public class UserService : IUserService
    {
        private readonly IUserRepository _repository;
        private readonly IMapper _mapper;
        public UserService(IUserRepository repository, IMapper mapper) {
            this._repository = repository;
            this._mapper = mapper;
        }

        public UserDto GetUserDto()
        {
            var user = _repository.GetUser();
            var result = _mapper.Map<UserDto>(user);

            return result;
        }
    }
}
